//quiz code start here
			var ans = new Array;
			var done = new Array;
			var newans = new Array(10);
			var score = 0;
			//ANSWERS FOR SPORTS
		    ans[1] = "d";
		    ans[2] = "d";
		    ans[3] = "a";
		    ans[4] = "a";
		    ans[5] = "c";
		    ans[6] = "b";
		    ans[7] = "a";
		    ans[8] = "a";
		    ans[9] = "c";
		    ans[10] = "c";	
			
			function EachLevel(question,txtname)
			{
				if(question == 1)
				{
					for(i=0;i<window.document.funstuff.one.length;i++)
					{
						if(newans[question])
						{
							if(window.document.funstuff.one[i].value == newans[question])
							{
								window.document.funstuff.one[i].checked = true;
							}
						}
					}
				}
				if(question == 2)
				{
					for(i=0;i<window.document.funstuff.two.length;i++)
					{
						if(newans[question])
						{
							if(window.document.funstuff.two[i].value == newans[question])
							{
								window.document.funstuff.two[i].checked = true;
							}
						}
					}
				}
				if(question == 3)
				{
					for(i=0;i<window.document.funstuff.three.length;i++)
					{
						if(newans[question])
						{
							if(window.document.funstuff.three[i].value == newans[question])
							{
								window.document.funstuff.three[i].checked = true;
							}
						}
					}
				}
				if(question == 4)
				{
					for(i=0;i<window.document.funstuff.four.length;i++)
					{
						if(newans[question])
						{
							if(window.document.funstuff.four[i].value == newans[question])
							{
								window.document.funstuff.four[i].checked = true;
							}
						}
					}
				}
				if(question == 5)
				{
					for(i=0;i<window.document.funstuff.five.length;i++)
					{
						if(newans[question])
						{
							if(window.document.funstuff.five[i].value == newans[question])
							{
								window.document.funstuff.five[i].checked = true;
							}
						}
					}
				}
				if(question == 6)
				{
					for(i=0;i<window.document.funstuff.six.length;i++)
					{
						if(newans[question])
						{
							if(window.document.funstuff.six[i].value == newans[question])
							{
								window.document.funstuff.six[i].checked = true;
							}
						}
					}
				}
				if(question == 7)
				{
					for(i=0;i<window.document.funstuff.seven.length;i++)
					{
						if(newans[question])
						{
							if(window.document.funstuff.seven[i].value == newans[question])
							{
								window.document.funstuff.seven[i].checked = true;
							}
						}
					}
				}
				if(question == 8)
				{
					for(i=0;i<window.document.funstuff.eight.length;i++)
					{
						if(newans[question])
						{
							if(window.document.funstuff.eight[i].value == newans[question])
							{
								window.document.funstuff.eight[i].checked = true;
							}
						}
					}
				}
				if(question == 9)
				{
					for(i=0;i<window.document.funstuff.nine.length;i++)
					{
						if(newans[question])
						{
							if(window.document.funstuff.nine[i].value == newans[question])
							{
								window.document.funstuff.nine[i].checked = true;
							}
						}
					}
				}
				if(question == 10)
				{
					for(i=0;i<window.document.funstuff.ten.length;i++)
					{
						if(newans[question])
						{
							if(window.document.funstuff.ten[i].value == newans[question])
							{
								window.document.funstuff.ten[i].checked = true;
							}
						}
					}
				}		
				
				if (txtname.value != ans[question])
				{
					if (!done[question])
					{
						newans[question] = txtname.value
						done[question] = -1;
						//alert("Wrong!\n\nYour score is now: " + score);
						alert("Wrong!view Answer..");
					}
					else
					{
						alert("You have already answered that!");
   					}
				}
				else
				{
					if (!done[question])
					{
						newans[question]=txtname.value
						done[question] = -1;
						score++;
						//alert("Correct!\n\nYour score is now: " + score);
						alert("Correct!");
					}
					else
					{		
						alert("You have already answered that!");
      				}
   				}
			}
			
			//function for the final scores
			function FinalScore()
			{
				if(newans[1] && newans[2] && newans[3] && newans[4] && newans[5] && newans[6] && newans[7] && newans[8] && newans[9] && newans[10])
				{
					if (score > 10)
					{
						alert("Cheater!");
					}
					if (score >= 7 && score < 11)
					{
						alert("Great Job! You have scored " + score)
					}
					else
					{
						alert("Oops! You have scored only " + score)
   					}
				}
				else
				{
					alert("Please answer all the questions to view your final score");
				}
			}
			
			//function to retake the quiz
			function retake()
			{
				alert("You are now ready to retake the quiz!");
				for(i=0;i<funstuff.one.length;i++)
				{
					window.document.funstuff.one[i].checked=false
				}
				for(i=0;i<funstuff.two.length;i++)
				{
					window.document.funstuff.two[i].checked=false
				}
				for(i=0;i<funstuff.three.length;i++)
				{
					window.document.funstuff.three[i].checked=false
				}
				for(i=0;i<funstuff.four.length;i++)
				{
					window.document.funstuff.four[i].checked=false
				}
				for(i=0;i<funstuff.five.length;i++)
				{
					window.document.funstuff.five[i].checked=false
				}
				for(i=0;i<funstuff.six.length;i++)
				{
					window.document.funstuff.six[i].checked=false
				}
				for(i=0;i<funstuff.seven.length;i++)
				{
					window.document.funstuff.seven[i].checked=false
				}
				for(i=0;i<funstuff.eight.length;i++)
				{
					window.document.funstuff.eight[i].checked=false
				}
				for(i=0;i<funstuff.nine.length;i++)
				{
					window.document.funstuff.nine[i].checked=false
				}
				for(i=0;i<funstuff.ten.length;i++)
				{
					window.document.funstuff.ten[i].checked=false
				}
				
				score = 0
				for(i=1;i<=10;i++)
				{
					newans[i] = ""
					done[i] = ""
				}
			}
			
			//function Answers()
			//{
				//alert(" 1. c   2. a   3. b   4. b   5. d \n 6. c   7. c   8. c   9. d   10. a");
			//}						